import 'package:tender_flutter/page/home/model/market_detail_entity.dart';

marketDetailEntityFromJson(MarketDetailEntity data, Map<String, dynamic> json) {
	if (json['area'] != null) {
		data.area = json['area'].toString();
	}
	if (json['infoType'] != null) {
		data.infoType = json['infoType'].toString();
	}
	if (json['money'] != null) {
		data.money = json['money'].toString();
	}
	if (json['name'] != null) {
		data.name = json['name'].toString();
	}
	if (json['company'] != null) {
		data.company = json['company'].toString();
	}
	if (json['phone'] != null) {
		data.phone = json['phone'].toString();
	}
	if (json['id'] != null) {
		data.id = json['id'].toString();
	}
	if (json['title'] != null) {
		data.title = json['title'].toString();
	}
	if (json['wx'] != null) {
		data.wx = json['wx'].toString();
	}
	if (json['pics'] != null) {
		data.pics = json['pics']?.map((v) => v.toString())?.toList()?.cast<String>();
	}
	if (json['content'] != null) {
		data.content = json['content'].toString();
	}
	if (json['createDate'] != null) {
		data.createDate = json['createDate'].toString();
	}
	return data;
}

Map<String, dynamic> marketDetailEntityToJson(MarketDetailEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['area'] = entity.area;
	data['infoType'] = entity.infoType;
	data['money'] = entity.money;
	data['name'] = entity.name;
	data['company'] = entity.company;
	data['phone'] = entity.phone;
	data['id'] = entity.id;
	data['title'] = entity.title;
	data['wx'] = entity.wx;
	data['pics'] = entity.pics;
	data['content'] = entity.content;
	data['createDate'] = entity.createDate;
	return data;
}